package com.dlc.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.model.ShopCompany;
import com.dlc.shop.bean.model.ShopDetail;
import com.dlc.shop.bean.vo.ShopCompanyVO;

/**
 * @Author lth
 * @Date 2021/8/3 16:16
 */
public interface ShopCompanyService extends IService<ShopCompany> {

    /**
     * 获取详情
     * @param shopId 店铺id
     * @param status 状态
     * @return 店铺工商信息VO
     */
    ShopCompanyVO getInfo(Long shopId, Integer status);

    /**
     * 保存店铺工商信息
     * @param shopCompany
     */
    void saveInfo(ShopCompany shopCompany);

    /**
     * 根据店铺id更新工商信息
     * @param shopCompany
     */
    void updateByShopId(ShopCompany shopCompany);

    /**
     * 平台更新商家工商信息
     * @param shopCompany
     * @param shopId
     */
    void platformUpdateShopCompany(ShopCompany shopCompany, Long shopId);

    /**
     * 影印件采集
     * @param shopCompany
     * @param shopId
     * @return
     */
    String idCardCollect(ShopCompanyVO shopCompany, Long shopId);

    /**
     * 重新单独上传影印件
     * @param shopCompany
     * @param shopDetailVO
     * @param status
     * @return
     */
    String uploadIdCard(ShopCompany shopCompany, ShopDetail shopDetailVO, Integer status);

    /**
     * 更新正常的商家工商信息为待审核
     */
    void updateStatusToWaitAudit();

    /**
     * 根据店铺id和状态获取工商信息
     * @param shopId
     * @param status
     * @return
     */
    ShopCompanyVO getShopCompanyByShopIdAndStatus(Long shopId, Integer status);

    /**
     * 检查信用代码是否重复
     * @param creditCode
     * @param shopId
     * @return
     */
    Boolean checkCreditCode(String creditCode, Long shopId);
}
